<style lang="less">
@import '../../../styles/common.less';
</style>
<template>
<div class='main_item'>
        <div @click="dataShow('caseInfoData')" id="moxx" class="main_item_title">
            <span style="font-weight:bold;" icon="md-arrow-dropdown">案件信息</span>
            <span style="float:right">
                <Icon type="md-arrow-dropdown" id="caseInfoData_icon"></Icon>
            </span>
        </div>
        <div id="caseInfoData" class="main_item_content_block">
            <div style="margin:30px 10px 10px 10px;">
              <Form  :label-width="200" inline>
                <FormItem label="案件索引号" >
                  <Input v-model="caseInfo.caseIndex" :disabled="true" style="width:150px"/>
                </FormItem>
                <FormItem label="逾期总金额" >
                  <Input v-model="caseInfo.overdueAmount"  :disabled="true" style="width:150px"/>
                </FormItem>
                <FormItem label="合同号" >
                  <Input v-model="caseInfo.contractId"  :disabled="true" style="width:150px"/>
                </FormItem>
                <FormItem label="入催日期" >
                  {{this.$util.loanModularFormatTime(caseInfo.remindersDate)}}
                </FormItem>

                </br>
                <FormItem label="更新标示" >
                  <Input v-model="caseInfo.updatePrompt" :disabled="true" style="width:150px"/>
                </FormItem>
                <FormItem label="当前催收员" >
                  <Input v-model="caseInfo.currCollector" :disabled="true" style="width:150px"/>
                </FormItem>
                <FormItem label="当前岗位" >
                  <Input v-model="caseInfo.currentPost" :disabled="true" style="width:150px"/>
                </FormItem>
                <FormItem label="更新时间" >
                  {{this.$util.loanModularFormatTime(caseInfo.updateDate)}}
                </FormItem>

                </br>

                <FormItem label="最后一次行动索引号" >
                  <Input v-model="caseInfo.lastActionIndex" :disabled="true" style="width:150px"/>
                </FormItem>
                <FormItem label="最后一次行动名称" >
                  <Input v-model="caseInfo.lastActionName" :disabled="true" style="width:150px"/>
                </FormItem>
                <FormItem label="最后一次行动状态" >
                  <Input v-model="caseInfo.lastActionStatus" :disabled="true" style="width:150px"/>
                </FormItem>
                <FormItem label="最后一次行动时间" >
                  {{this.$util.loanModularFormatTime(caseInfo.lastActionDate)}}
                </FormItem>
                </br>
                <FormItem label="本次入催时的期号" >
                  <Input v-model="caseInfo.thePeriodThisTime" :disabled="true" style="width:150px"/>
                </FormItem>
                <FormItem label="实际还款人" >
                  <Input v-model="caseInfo.realPayer" :disabled="true" style="width:150px"/>
                </FormItem>
                <FormItem label="总贷款期数" >
                  <Input v-model="caseInfo.totalLoanPeriod" :disabled="true" style="width:150px"/>
                </FormItem>
                <FormItem label="当前任务约会时间" >
                  {{this.$util.loanModularFormatTime(caseInfo.currentTaskDate)}}
                </FormItem>
                </br>

                <FormItem label="入催原因代码(00:正常01:逾期)" >
                  <Input v-model="caseInfo.sourceCode" :disabled="true" style="width:150px"/>
                </FormItem>
                <FormItem label="入催特殊代码(NL:无CV:初始化MA:强制)" >
                  <Input v-model="caseInfo.enterSpecialCode" :disabled="true" style="width:150px"/>
                </FormItem>
                <FormItem label="本次出催日期" >
                  {{this.$util.loanModularFormatTime(caseInfo.thisDate)}}
                </FormItem>

                </br>
                <FormItem label="逾期总金额余额" >
                  <Input v-model="caseInfo.overdueAmountTotal" :disabled="true" style="width:150px"/>
                </FormItem>
                <FormItem label="逾期本金余额" >
                  <Input v-model="caseInfo.overduePrincipal" :disabled="true" style="width:150px"/>
                </FormItem>
                <FormItem label="逾期利息余额" >
                  <Input v-model="caseInfo.overdueInterest" :disabled="true" style="width:150px"/>
                </FormItem>
                <FormItem label="逾期费用余额" >
                  <Input v-model="caseInfo.overdueFee" :disabled="true" style="width:150px"/>
                </FormItem>
                </Form>
            </div>
        </div>
  </div>

</template>

<script>
export default {
  name: 'case-info',
  data () {
    return {
      comptParams: {
        loanId: '',
        overdueCode: ''
      },
      caseInfo: {
        caseIndex: '',
        overdueAmount: '',
        contractNo: '',
        remindersDate: '',
        updatePrompt: '',
        updateDate: '',
        currCollector: '',
        currentPost: '',
        lastActionIndex: '',
        currentTaskDate: '',
        thePeriodThisTime: '',
        realPayer: '',
        totalLoanPeriod: '',
        overdueAmountTotal: '',
        sourceCode: '',
        enterSpecialCode: '',
        thisDate: '',
        overduePrincipal: '',
        overdueInterest: '',
        overdueFee: ''
      }
    }
  },
  computed: {
    avatorImage () {
      return localStorage.avatorImgPath
    }
  },

  created () {
    // 初始化当前页面请求对象实例
    this.$ajax = this.$util.ajax()
    this.initData()
  },
  methods: {
    initData () {
      var vm = this
      vm.comptParams.loanId = this.collectTaskParams.loanId
      vm.comptParams.overdueCode = this.collectTaskParams.overdueCode
      this.$ajax.post(this.$appContext.marvels_core_financial + 'financial/collection/manage/service/caseInfo', vm.comptParams).then(re => {
        var data = re.data
        vm.caseInfo = data.data
      }).catch(er => {

      })
    },
    dataShow: function (tagId) {
      var clickTag = document.getElementById(tagId)
      if (clickTag.className === 'main_item_content') {
        clickTag.className = 'main_item_content_block'
        document.getElementById(tagId + '_icon').className = 'ivu-icon ivu-icon-md-arrow-dropup'
      } else {
        clickTag.className = 'main_item_content'
        document.getElementById(tagId + '_icon').className = 'ivu-icon ivu-icon-md-arrow-dropdown'
      }
    }

  },
  props: {
    collectTaskParams: Object
  }
}
</script>
<style lang="less">
.row-col-style {
  background-color: #dcdcdc;
  text-align: center;
  height: 100%;
}
</style>
